import VueRouter from 'vue-router'

//引入组件
import Index from '../pages'
import Home from '../pages/home/home'
import Login from '../pages/login/login'
import Register from '../pages/register/register'
import Center from '../pages/center/center'
import Storeup from '../pages/storeup/list'
import News from '../pages/news/news-list'
import NewsDetail from '../pages/news/news-detail'
import payList from '../pages/pay'

import jiaoshiList from '../pages/jiaoshi/list'
import jiaoshiDetail from '../pages/jiaoshi/detail'
import jiaoshiAdd from '../pages/jiaoshi/add'
import caipanyuanList from '../pages/caipanyuan/list'
import caipanyuanDetail from '../pages/caipanyuan/detail'
import caipanyuanAdd from '../pages/caipanyuan/add'
import xueshengList from '../pages/xuesheng/list'
import xueshengDetail from '../pages/xuesheng/detail'
import xueshengAdd from '../pages/xuesheng/add'
import changciList from '../pages/changci/list'
import changciDetail from '../pages/changci/detail'
import changciAdd from '../pages/changci/add'
import fenzuList from '../pages/fenzu/list'
import fenzuDetail from '../pages/fenzu/detail'
import fenzuAdd from '../pages/fenzu/add'
import yundongmingchengList from '../pages/yundongmingcheng/list'
import yundongmingchengDetail from '../pages/yundongmingcheng/detail'
import yundongmingchengAdd from '../pages/yundongmingcheng/add'
import xueshengyundongxiangmuList from '../pages/xueshengyundongxiangmu/list'
import xueshengyundongxiangmuDetail from '../pages/xueshengyundongxiangmu/detail'
import xueshengyundongxiangmuAdd from '../pages/xueshengyundongxiangmu/add'
import xueshengbaomingxinxiList from '../pages/xueshengbaomingxinxi/list'
import xueshengbaomingxinxiDetail from '../pages/xueshengbaomingxinxi/detail'
import xueshengbaomingxinxiAdd from '../pages/xueshengbaomingxinxi/add'
import xueshengsaichenganpaiList from '../pages/xueshengsaichenganpai/list'
import xueshengsaichenganpaiDetail from '../pages/xueshengsaichenganpai/detail'
import xueshengsaichenganpaiAdd from '../pages/xueshengsaichenganpai/add'
import jiaoshiyundongxiangmuList from '../pages/jiaoshiyundongxiangmu/list'
import jiaoshiyundongxiangmuDetail from '../pages/jiaoshiyundongxiangmu/detail'
import jiaoshiyundongxiangmuAdd from '../pages/jiaoshiyundongxiangmu/add'
import jiaoshibaomingxinxiList from '../pages/jiaoshibaomingxinxi/list'
import jiaoshibaomingxinxiDetail from '../pages/jiaoshibaomingxinxi/detail'
import jiaoshibaomingxinxiAdd from '../pages/jiaoshibaomingxinxi/add'
import jiaoshisaichenganpaiList from '../pages/jiaoshisaichenganpai/list'
import jiaoshisaichenganpaiDetail from '../pages/jiaoshisaichenganpai/detail'
import jiaoshisaichenganpaiAdd from '../pages/jiaoshisaichenganpai/add'
import xueshengyundongchengjiList from '../pages/xueshengyundongchengji/list'
import xueshengyundongchengjiDetail from '../pages/xueshengyundongchengji/detail'
import xueshengyundongchengjiAdd from '../pages/xueshengyundongchengji/add'
import jiaoshiyundongchengjiList from '../pages/jiaoshiyundongchengji/list'
import jiaoshiyundongchengjiDetail from '../pages/jiaoshiyundongchengji/detail'
import jiaoshiyundongchengjiAdd from '../pages/jiaoshiyundongchengji/add'
import newstypeList from '../pages/newstype/list'
import newstypeDetail from '../pages/newstype/detail'
import newstypeAdd from '../pages/newstype/add'
import aboutusList from '../pages/aboutus/list'
import aboutusDetail from '../pages/aboutus/detail'
import aboutusAdd from '../pages/aboutus/add'
import systemintroList from '../pages/systemintro/list'
import systemintroDetail from '../pages/systemintro/detail'
import systemintroAdd from '../pages/systemintro/add'
import discussxueshengyundongxiangmuList from '../pages/discussxueshengyundongxiangmu/list'
import discussxueshengyundongxiangmuDetail from '../pages/discussxueshengyundongxiangmu/detail'
import discussxueshengyundongxiangmuAdd from '../pages/discussxueshengyundongxiangmu/add'
import discussjiaoshiyundongxiangmuList from '../pages/discussjiaoshiyundongxiangmu/list'
import discussjiaoshiyundongxiangmuDetail from '../pages/discussjiaoshiyundongxiangmu/detail'
import discussjiaoshiyundongxiangmuAdd from '../pages/discussjiaoshiyundongxiangmu/add'

const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
	return originalPush.call(this, location).catch(err => err)
}

//配置路由
export default new VueRouter({
	routes:[
		{
			path: '/',
			redirect: '/index/home'
		},
		{
			path: '/index',
			component: Index,
			children:[
				{
					path: 'home',
					component: Home
				},
				{
					path: 'center',
					component: Center,
				},
				{
					path: 'pay',
					component: payList,
				},
				{
					path: 'storeup',
					component: Storeup
				},
				{
					path: 'news',
					component: News
				},
				{
					path: 'newsDetail',
					component: NewsDetail
				},
				{
					path: 'jiaoshi',
					component: jiaoshiList
				},
				{
					path: 'jiaoshiDetail',
					component: jiaoshiDetail
				},
				{
					path: 'jiaoshiAdd',
					component: jiaoshiAdd
				},
				{
					path: 'caipanyuan',
					component: caipanyuanList
				},
				{
					path: 'caipanyuanDetail',
					component: caipanyuanDetail
				},
				{
					path: 'caipanyuanAdd',
					component: caipanyuanAdd
				},
				{
					path: 'xuesheng',
					component: xueshengList
				},
				{
					path: 'xueshengDetail',
					component: xueshengDetail
				},
				{
					path: 'xueshengAdd',
					component: xueshengAdd
				},
				{
					path: 'changci',
					component: changciList
				},
				{
					path: 'changciDetail',
					component: changciDetail
				},
				{
					path: 'changciAdd',
					component: changciAdd
				},
				{
					path: 'fenzu',
					component: fenzuList
				},
				{
					path: 'fenzuDetail',
					component: fenzuDetail
				},
				{
					path: 'fenzuAdd',
					component: fenzuAdd
				},
				{
					path: 'yundongmingcheng',
					component: yundongmingchengList
				},
				{
					path: 'yundongmingchengDetail',
					component: yundongmingchengDetail
				},
				{
					path: 'yundongmingchengAdd',
					component: yundongmingchengAdd
				},
				{
					path: 'xueshengyundongxiangmu',
					component: xueshengyundongxiangmuList
				},
				{
					path: 'xueshengyundongxiangmuDetail',
					component: xueshengyundongxiangmuDetail
				},
				{
					path: 'xueshengyundongxiangmuAdd',
					component: xueshengyundongxiangmuAdd
				},
				{
					path: 'xueshengbaomingxinxi',
					component: xueshengbaomingxinxiList
				},
				{
					path: 'xueshengbaomingxinxiDetail',
					component: xueshengbaomingxinxiDetail
				},
				{
					path: 'xueshengbaomingxinxiAdd',
					component: xueshengbaomingxinxiAdd
				},
				{
					path: 'xueshengsaichenganpai',
					component: xueshengsaichenganpaiList
				},
				{
					path: 'xueshengsaichenganpaiDetail',
					component: xueshengsaichenganpaiDetail
				},
				{
					path: 'xueshengsaichenganpaiAdd',
					component: xueshengsaichenganpaiAdd
				},
				{
					path: 'jiaoshiyundongxiangmu',
					component: jiaoshiyundongxiangmuList
				},
				{
					path: 'jiaoshiyundongxiangmuDetail',
					component: jiaoshiyundongxiangmuDetail
				},
				{
					path: 'jiaoshiyundongxiangmuAdd',
					component: jiaoshiyundongxiangmuAdd
				},
				{
					path: 'jiaoshibaomingxinxi',
					component: jiaoshibaomingxinxiList
				},
				{
					path: 'jiaoshibaomingxinxiDetail',
					component: jiaoshibaomingxinxiDetail
				},
				{
					path: 'jiaoshibaomingxinxiAdd',
					component: jiaoshibaomingxinxiAdd
				},
				{
					path: 'jiaoshisaichenganpai',
					component: jiaoshisaichenganpaiList
				},
				{
					path: 'jiaoshisaichenganpaiDetail',
					component: jiaoshisaichenganpaiDetail
				},
				{
					path: 'jiaoshisaichenganpaiAdd',
					component: jiaoshisaichenganpaiAdd
				},
				{
					path: 'xueshengyundongchengji',
					component: xueshengyundongchengjiList
				},
				{
					path: 'xueshengyundongchengjiDetail',
					component: xueshengyundongchengjiDetail
				},
				{
					path: 'xueshengyundongchengjiAdd',
					component: xueshengyundongchengjiAdd
				},
				{
					path: 'jiaoshiyundongchengji',
					component: jiaoshiyundongchengjiList
				},
				{
					path: 'jiaoshiyundongchengjiDetail',
					component: jiaoshiyundongchengjiDetail
				},
				{
					path: 'jiaoshiyundongchengjiAdd',
					component: jiaoshiyundongchengjiAdd
				},
				{
					path: 'newstype',
					component: newstypeList
				},
				{
					path: 'newstypeDetail',
					component: newstypeDetail
				},
				{
					path: 'newstypeAdd',
					component: newstypeAdd
				},
				{
					path: 'aboutus',
					component: aboutusList
				},
				{
					path: 'aboutusDetail',
					component: aboutusDetail
				},
				{
					path: 'aboutusAdd',
					component: aboutusAdd
				},
				{
					path: 'systemintro',
					component: systemintroList
				},
				{
					path: 'systemintroDetail',
					component: systemintroDetail
				},
				{
					path: 'systemintroAdd',
					component: systemintroAdd
				},
				{
					path: 'discussxueshengyundongxiangmu',
					component: discussxueshengyundongxiangmuList
				},
				{
					path: 'discussxueshengyundongxiangmuDetail',
					component: discussxueshengyundongxiangmuDetail
				},
				{
					path: 'discussxueshengyundongxiangmuAdd',
					component: discussxueshengyundongxiangmuAdd
				},
				{
					path: 'discussjiaoshiyundongxiangmu',
					component: discussjiaoshiyundongxiangmuList
				},
				{
					path: 'discussjiaoshiyundongxiangmuDetail',
					component: discussjiaoshiyundongxiangmuDetail
				},
				{
					path: 'discussjiaoshiyundongxiangmuAdd',
					component: discussjiaoshiyundongxiangmuAdd
				},
			]
		},
		{
			path: '/login',
			component: Login
		},
		{
			path: '/register',
			component: Register
		},
	]
})
